import request from '@/utils/request'

export function list (commentQuery) {
  return request({
    url: '/blog-core/front/comment/list',
    method: 'get',
    params: commentQuery
  })
}

// 最新评论
export function latest (query) {
  return request({
    url: '/blog-core/front/comment/latest',
    method: 'get',
    params: query
  })
}

// 发布评论
export function add (data) {
  return request({
    url: '/blog-core/front/comment',
    method: 'post',
    data
  })
}

// 获取子评论
export function getSubCommentList (commentQuery) {
  return request({
    url: '/blog-core/front/comment/childrenList',
    method: 'get',
    params: commentQuery
  })
}
